import { alovaInstance as alova } from './alova'

/**
 * @description: 上传接口
 * @param { File } file
 * @return {*}
 */
export function uploadCos(file: File) {
  const form = new FormData()
  form.append('file', file)
  return alova.Post<{
    Data: { Url: string }
  }>('/cos/upload', form)
}

/**
 * @description: 删除cos
 * @param {string} urls
 * @return {*}
 */
export const deleteCos = (urls: string[]) => alova.Delete('/cos/delete', { urls })
